package diploma.substitucija;

import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;

public class Buffer
{
	public static  StringBuffer file2Buffer(File f) throws FileNotFoundException
	{
		Scanner scan = new Scanner(f, "utf8");
		StringBuffer sb = new StringBuffer();
		while(scan.hasNextLine())
		{
			sb.append(scan.nextLine() + "\n");
		}
		return sb;
	}
}
